//
//  User.m
//  WHB_driver
//
//  Created by 徐国庆 on 15/12/29.
//  Copyright (c) 2015年 turing. All rights reserved.
//

#import "User.h"

@implementation User


+(NSDictionary*)JSONKeyPathsByPropertyKey{
    
    return @{
             @"userId":@"userId",
             @"userHeadPhoto":@"userHeadPhoto",
             @"auditStatus":@"auditStatus",
             @"name":@"name",
             @"brandName":@"brandName",
             @"brandPhoto":@"brandPhoto",
             @"licensePlate":@"licensePlate",
             @"telNum":@"telNum",
             @"orgName":@"orgName",
            
             };
}

#pragma mark -
#pragma mark 对字段值进行转换 方法名称格式为:属性+JSONTransformer 否则框架无法识别转换方法
//amount
+(NSValueTransformer*)amountJSONTransformer{
    
    return [MTLValueTransformer reversibleTransformerWithBlock:^id(NSString *amout) {
        return @(amout.floatValue);
    }];
}

//realPrice
+(NSValueTransformer*)realPriceJSONTransformer{
    
    return [MTLValueTransformer reversibleTransformerWithBlock:^id(NSString *realPrice) {
        return @(realPrice.floatValue);
    }];
}

@end
